package com.spring.demo4.eg3;

/**
 * @author vhans
 */
public class UserService {

    public void work(String passwd) throws Exception{
        System.out.println("准备登录");
        if (!"123456".equals(passwd)) {
            throw new Exception("密码错误");
        }
        System.out.println("登录成功");
    }
}
